<% content_for :sitemap do %>
  <span class="current"><%= t("cpane.menu.nodes")%></span>
<% end %>

<div class="toolbar">
  <%= link_to '创建新节点', new_admin_node_path, class: "btn btn-default" %>
</div>

<table class="table table-bordered table-striped table-condensed">
  <tr class="head">
    <td class="first">#</td>
    <td>Name</td>
    <td>Section</td>
    <td>排序</td>
    <td>帖子数量</td>
    <td></td>
  </tr>

<% @nodes.each do |node| %>
  <tr>
    <td class="first"><%= node.id %></td>
    <td><%= node.name %></td>
    <td><%= node.section.name %></td>
    <td><%= node.sort %></td>
    <td><%= node.topics_count %></td>
    <td><%= link_to '', edit_admin_node_path(node), class: "fa fa-pencil" %>
    <%= link_to '', admin_node_path(node), 'data-confirm' => 'Are you sure?' , method: :delete, class: "fa fa-trash" %></td>
  </tr>
<% end %>
</table>
